import { uploadType } from '@/utils/util'

export const detailConfig: any = {
	label: '运营记录详情',
	inline: false,
	showBtn: false,
	labelPosition: 'left',
	labelWidth: '200px',
	column: [
		//-------------------- 老人花名册 ----------------

		{
			label: '姓名',
			prop: 'name',
			type: 'text',
			maxlength: '50',
			showWordLimit: true,
			span: 12,
		},
		{
			label: '身份证号',
			prop: 'idCard',
			type: 'input',
			span: 12,
		},
		{
			label: '入住协议',
			prop: 'checkAgreement',
			type: 'upload',
			fileType: uploadType.fileMetaType,
			listType: 'text',
			showFileList: true,
			limit: 9,
			multiple: true,
			span: 12,
		},
		{
			label: '老人身份证',
			prop: 'idCardImg',
			type: 'upload',
			fileType: uploadType.fileMetaType,
			listType: 'text',
			showFileList: true,
			limit: 9,
			multiple: true,
			span: 12,
		},
		{
			label: '户口簿',
			prop: 'residenceBooklet',
			type: 'upload',
			fileType: uploadType.fileMetaType,
			listType: 'text',
			showFileList: true,
			limit: 9,
			multiple: true,
			span: 12,
		},
		{
			label: '老人照片',
			prop: 'oldmanImg',
			type: 'upload',
			showFileList: false,
			limit: 9,
			multiple: true,
			span: 12,
		},
		{
			label: '健康检查资料',
			prop: 'checkData',
			type: 'upload',
			fileType: uploadType.fileMetaType,
			listType: 'text',
			showFileList: true,
			limit: 9,
			multiple: true,
			span: 12,
		},
		{
			label: '监护人姓名',
			prop: 'guardianName',
			span: 8,
		},
		{
			label: '监护人联系方式',
			prop: 'guardianPhone',
			span: 8,
		},
		{
			label: '监护人和老人关系',
			prop: 'relationRelation',
			propName:"relationRelationLabel",
			code:"ELDERLY_RELATIONSHIP",
			api:"getDictItemList",
			type:'remoteSelect',
			span: 8,
		},
	],
}
const tableConfig = {
	stripe: true,
	border: true,
	maxHeight: '80vh',
	columns: [
		{
			label: '姓名',
			prop: 'name',
			type: 'text',
			maxlength: '50',
			showWordLimit: true,
			span: 12,
		},
		{
			label: '身份证号',
			prop: 'idCard',
			type: 'input',
			span: 12,
		},
		{
			label: '入住协议',
			prop: 'checkAgreement',
			custome: 'file',
			span: 12,
		},
		{
			label: '老人身份证',
			prop: 'idCardImg',
			custome: 'file',
			span: 12,
		},
		{
			label: '户口簿',
			prop: 'residenceBooklet',
			custome: 'file',
			span: 12,
		},
		{
			label: '老人照片',
			prop: 'oldmanImg',
			custome: 'file',
			span: 12,
		},
		{
			label: '健康检查资料',
			prop: 'checkData',
			custome: 'file',
			span: 12,
		},
		{
			label: '监护人姓名',
			prop: 'guardianName',
			span: 8,
		},
		{
			label: '监护人联系方式',
			prop: 'guardianPhone',
			span: 8,
		},
		{
			label: '监护人和老人关系',
			prop: 'relationRelation',
			propName:"relationRelationLabel",
			code:"ELDERLY_RELATIONSHIP",
			api:"getDictItemList",
			type:'remoteSelect',
			span: 8,
		},
		// {
		// 	prop: 'menu',
		// 	width: 300,
		// 	fixed: 'right',
		// },
	],
}
export const formConfig = {
	label: '老人花名册',
	prop: 'base0',
	inline: false,
	showBtn: true,
	labelPosition: 'left',
	column: detailConfig.column,
}
export const baseConfig: any = {
	pageName: '老人花名册',
	addLabel: '添加',
	dictcodes: ['ELDERLY_RELATIONSHIP'],
	rowKey: 'id',
	tipLabel: 'batch',
	api: {
		index: 'dpOrgBedSubsidyServiceObject_page',
		// edit: 'view_dpOperateRecord_edit',
		// delete: 'view_dpOperateRecord_del',
	},
	auth: {
		index: 'view_dpOrgBedSubsidyServiceObject_page',
		// edit: 'view_dpOperateRecord_edit',
		// delete: 'view_dpOperateRecord_del',
	},
	// menuBtn: [
		// {
		// 	icon: 'editor',
		// 	label: '查看详情',
		// 	type: 'primary',
		// 	operate: 'detail',
		// 	auth: '',
		// 	text: true,
		// 	show: true,
		// },
		// {
		// 	icon: 'editor',
		// 	label: '编辑',
		// 	type: 'primary',
		// 	operate: 'edit',
		// 	auth: 'view_dataManagementSettings_edit',
		// 	text: true,
		// 	show: true,
		// },
		// {
		// 	icon: 'delete',
		// 	label: '删除',
		// 	type: 'primary',
		// 	operate: 'delete',
		// 	auth: 'view_dataManagementSettings_del',
		// 	text: true,
		// 	show: true,
		// },
	// ],
	dialogConfig: {
		width: '65%',
	},
	tableConfig,
	formConfig,
	// detailConfig,
}
